home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15852 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  658 b 

  1. Path: cocoa.brown.edu!cs032137
  2. From: cs032137@cs.brown.edu (Jeremy Rothman)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: How do I put DIFFERENT classes in the same linked list?
  5. Date: 8 Apr 1996 14:38:08 GMT
  6. Organization: Brown University
  7. Message-ID: <4kb8cg$2mp@cocoa.brown.edu>
  8. References: <4ka938$bj6@wintermute.ecs.fullerton.edu>
  9. NNTP-Posting-Host: cslab9a.cs.brown.edu
  10.  
  11. In article <4ka938$bj6@wintermute.ecs.fullerton.edu>,
  12. Gil Rosin <grosin@titan> wrote:
  13. >class A
  14. > {
  15. >  public:
  16. >    A *next;
  17. >    A *prev;
  18. >    void Print();
  19. > };
  20.  
  21. I think that your problem is that you need to make the Print function virtual.
  22.  
  23. -- Jeremy Rothman
  24.    Jeremy_Rothman@brown.edu
  25.  
  26.